home *** CD-ROM | disk | FTP | other *** search
- function onEnterFrame()
- {
- if(this.hitTest(_parent._parent._parent.STAGE))
- {
- i = 1;
- while(i <= numSects)
- {
- this["flag" + i]._y = startY + Math.sin(w / speed + inc * i) * size;
- i++;
- }
- w++;
- if(this.hit.hitTest(_parent._parent.HERO.body) and hitSwitch == false)
- {
- _parent._parent.HERO.win = true;
- _parent._parent.camElasticStore = 1000;
- hitSwitch = true;
- _parent._parent._parent.STAGE.newSound("Sound_Glass");
- i = 1;
- while(i <= numSects)
- {
- this["flag" + i].gotoAndStop(2);
- i++;
- }
- flagBase.gotoAndStop(2);
- _parent._parent._parent.MESSAGES.removeMovieClip();
- stopAllSounds();
- _parent._parent._parent.HUD.gotoAndStop("COMPLETE");
- this._xscale = - this._xscale;
- _parent._parent.function_newParticle(this._x,this._y,"Class_Particle",100);
- }
- }
- }
- hitSwitch = false;
- hit._visible = false;
- _xscale = - _xscale;
- var numSects = 10;
- var startY = -60;
- var size = 3;
- var speed = 5;
- var inc = 6.283185307179586 / numSects;
- var w = 0;
-